/PROG  TESTXL
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53301125";
PROG_SIZE	= 3772;
CREATE		= DATE 19-09-18  TIME 15:01:08;
MODIFIED	= DATE 19-09-18  TIME 15:35:32;
FILE_NAME	= TESTLVBA;
VERSION		= 0;
LINE_COUNT	= 141;
MEMORY_SIZE	= 4256;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0051 ;
   7:  !  PART:53301125  ;
   8:  !ZYL15-7-16********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  //R[5:SPEED]=10    ;
  24:  R[32:CYCLE COUNT]=0    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:  LBL[1] ;
  27:J P[6] 50% CNT20    ;
  28:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  29:J P[4] 100% CNT100    ;
  30:J P[14] 100% CNT0 TB R[18]sec,CALL PARTPICK    ;
  31:   ;
  32:   ;
  33:   ;
  34:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  35:   ;
  36:  R[1:CYCLE TOTAL]=0    ;
  37:  TIMER[1]=RESET ;
  38:  TIMER[1]=START ;
  39:  JMP LBL[10] ;
  40:   ;
  41:  LBL[5] ;
  42:  PR[6:PICK POSTION]=PR[7:PNS70 PS]    ;
  43:  R[32:CYCLE COUNT]=0    ;
  44:  JMP LBL[10] ;
  45:   ;
  46:  !***DO NOT RUN THIS LBL8*** ;
  47:  LBL[8] ;
  48:  JMP LBL[10] ;
  49:  PR[7:PNS70 PS]=PR[6:PICK POSTION]    ;
  50:   ;
  51:  LBL[10:TOP OF LOOF] ;
  52:   ;
  53:  TIMER[3]=STOP ;
  54:  TIMER[2]=STOP ;
  55:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  56:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  57:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  58:  R[8:R MOVE TIME]=TIMER[3]    ;
  59:  TIMER[2]=RESET ;
  60:  TIMER[2]=START ;
  61:  TIMER[3]=RESET ;
  62:   ;
  63:  !PROCEED TO PICK ;
  64:  LBL[20] ;
  65:   ;
  66:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON,JMP LBL[25] ;
  67:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  68:  JMP LBL[20] ;
  69:   ;
  70:  LBL[25] ;
  71:   ;
  72:   ;
  73:   ;
  74:   ;
  75:  TIMER[3]=START ;
  76:J P[3:PICK APPROACH] 100% CNT30 ACC100    ;
  77:J P[17] 100% FINE ACC100 TB R[19]sec,CALL PARTDROP    ;
  78:  PAYLOAD[4] ;
  79:J P[5:PICK DEPART] 100% CNT30 ACC100    ;
  80:J P[2:PICK POUNCE] 80% CNT0    ;
  81:  WAIT   3.50(sec) ;
  82:   ;
  83:J P[15:PICK APPROACH] 100% CNT30 ACC100    ;
  84:J P[17] 100% CNT5 ACC100 TB R[18]sec,CALL PARTPICK    ;
  85:  //DO[16:CL 9 ON]=ON ;
  86:  //DO[17:REQ FINGER OPEN 10]=ON ;
  87:  PAYLOAD[4] ;
  88:J P[5:PICK DEPART] 100% CNT50 ACC100    ;
  89:   ;
  90:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  91:   ;
  92:   ;
  93:   ;
  94:  LBL[30:GOTO DROP POUNCE] ;
  95:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  96:   ;
  97:  TIMER[3]=STOP ;
  98:  LBL[40:AT DROP POUNCE] ;
  99:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON,JMP LBL[80] ;
 100:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
 101:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
 102:  JMP LBL[40] ;
 103:   ;
 104:  LBL[50:MOVE DROP SNEAK] ;
 105:  TIMER[3]=START ;
 106:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
 107:  LBL[51:DROP OR C-P-S] ;
 108:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
 109:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
 110:  JMP LBL[51] ;
 111:  JMP LBL[50] ;
 112:   ;
 113:  LBL[60:MOVE CLS-PRS-ACC] ;
 114:J P[1:MIDDLE] 50% CNT100 ACC100    ;
 115:  PAUSE ;
 116:  JMP LBL[30] ;
 117:   ;
 118:  LBL[80:DROP ENABLED] ;
 119:  TIMER[3]=START ;
 120:  !PROCEED TO DROP ;
 121:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
 122:  MONITOR END Z_CHECH ;
 123:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 124:  PAYLOAD[3] ;
 125:  CALL CHK_DROP    ;
 126:   ;
 127:J P[12:DROP DEPART] 100% CNT100 ACC100    ;
 128:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 129:  !GOTO PICK POUNCE ;
 130:   ;
 131:J P[6] 100% CNT100 ACC100 BREAK    ;
 132:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 133:  JMP LBL[1] ;
 134:   ;
 135:  LBL[90:END OF CYCLE] ;
 136:  TIMER[1]=STOP ;
 137:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 138:J P[1:MIDDLE] 50% CNT100    ;
 139:  MOVE TO HOME    ;
 140:   ;
 141:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2797.498  mm,	Y =   453.936  mm,	Z = -1563.220  mm,
	W =  -180.000 deg,	P =      .001 deg,	R =   102.560 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2695.471  mm,	Y =  1033.620  mm,	Z =  -904.225  mm,
	W =   179.296 deg,	P =      .099 deg,	R =   112.219 deg,
	E1=   142.100 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2607.525  mm,	Y =  3360.924  mm,	Z =  -853.917  mm,
	W =   179.701 deg,	P =     -.317 deg,	R =    88.555 deg,
	E1=   195.470 deg
};
P[4]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2673.450  mm,	Y =   271.965  mm,	Z = -1846.497  mm,
	W =  -179.999 deg,	P =      .001 deg,	R =   102.562 deg,
	E1=   107.700 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2609.236  mm,	Y =  3362.209  mm,	Z =  -884.401  mm,
	W =   179.712 deg,	P =     -.307 deg,	R =    88.555 deg,
	E1=   195.469 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1816.021  mm,	Y =     -.058  mm,	Z = -1020.401  mm,
	W =   179.999 deg,	P =      .001 deg,	R =  -180.000 deg,
	E1=   107.699 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2686.362  mm,	Y =  1635.281  mm,	Z =  -872.621  mm,
	W =   179.455 deg,	P =      .069 deg,	R =   118.094 deg,
	E1=   140.982 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2702.477  mm,	Y = -1356.458  mm,	Z =  -841.005  mm,
	W =  -179.253 deg,	P =      .224 deg,	R =  -117.536 deg,
	E1=    46.973 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2244.630  mm,	Y = -2029.414  mm,	Z =  -836.894  mm,
	W =  -179.265 deg,	P =      .309 deg,	R =  -132.569 deg,
	E1=    56.886 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2626.102  mm,	Y = -3162.796  mm,	Z =  -808.473  mm,
	W =  -179.338 deg,	P =     -.470 deg,	R =   -90.917 deg,
	E1=    14.659 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2626.163  mm,	Y = -3162.846  mm,	Z =  -920.496  mm,
	W =  -179.335 deg,	P =     -.472 deg,	R =   -90.917 deg,
	E1=    14.659 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2626.102  mm,	Y = -3162.796  mm,	Z =  -808.473  mm,
	W =  -179.338 deg,	P =     -.470 deg,	R =   -90.917 deg,
	E1=    14.659 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2064.432  mm,	Y = -1287.326  mm,	Z =  -875.437  mm,
	W =  -179.493 deg,	P =      .586 deg,	R =  -151.481 deg,
	E1=    75.955 deg
};
P[14]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2673.450  mm,	Y =   271.965  mm,	Z = -1641.856  mm,
	W =  -179.999 deg,	P =      .001 deg,	R =   102.562 deg,
	E1=   107.700 deg
};
P[15:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2607.525  mm,	Y =  3360.924  mm,	Z =  -853.917  mm,
	W =   179.701 deg,	P =     -.317 deg,	R =    88.555 deg,
	E1=   195.470 deg
};
P[17]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2607.525  mm,	Y =  3360.924  mm,	Z = -1040.796  mm,
	W =   179.701 deg,	P =     -.317 deg,	R =    88.555 deg,
	E1=   195.470 deg
};
/END
